package com.doubao.notepad_blog_backend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Builder
@TableName("bms_tag")
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("标签实体")
public class BmsTag implements Serializable {
    private static final long serialVersionUID = 3257790983905872243L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("ID")
    private String id;

    @TableField("name")
    @ApiModelProperty("标签名")
    private String name;
    /**
     * 当前标签下的话题个数
     */
    @TableField("post_count")
    @Builder.Default
    @ApiModelProperty("标签下的话题个数")
    private Integer postCount = 1;
}


